﻿@model JinRiAdmin.WebHost.ViewModels.ProductModel
@{
    ViewBag.Title = "新增作品";
}

@Html.Partial("Form",Model)


@section Scripts{
    <script>
        $(function () {
            $('#bannerFileupload').fileupload({
                url: '../../Image/Upload',
                dataType: 'json',
                done: function (e, data) {
                    $('#submit').prop('disable', false);
                    $('#bannerImageId').val(data.result);
                },
                start: function () {
                    $('#submit').prop('disable', true);
                },
                progressall: function (e, data) {
                    var progress = parseInt(data.loaded / data.total * 100, 10);
                    $('#bannerProgress .progress-bar').css(
                        'width',
                        progress + '%'
                    );
                }
            }).prop('disabled', !$.support.fileInput)
                .parent().addClass($.support.fileInput ? undefined : 'disabled');

            $('#coverFileupload').fileupload({
                url: '../../Image/Upload',
                dataType: 'json',
                done: function (e, data) {
                    $('#submit').prop('disable', false);
                    $('#coverImageId').val(data.result);
                },
                start: function () {
                    $('#submit').prop('disable', true);
                },
                progressall: function (e, data) {
                    var progress = parseInt(data.loaded / data.total * 100, 10);
                    $('#coverProgress .progress-bar').css(
                        'width',
                        progress + '%'
                    );
                }
            }).prop('disabled', !$.support.fileInput)
    .parent().addClass($.support.fileInput ? undefined : 'disabled');
        });
    </script>
}
